/*
 * @SuperTV All Rights Reserved
 */

package com.huyn.baseframework.model;

import com.huyn.baseframework.utils.StringUtils;

import java.io.Serializable;

/**
 * Created by huyaonan on 16/3/18.
 */
public class ChannelDetail implements Serializable{

    public String videoid;
    public String videoTitle;
    public String videoDesc;
    public String playTimestamp;
    public int duration;
    public String videono;

    public VideoWithDefinitionModel videoPlay;

    public String showid;

    public String cameraType;
    public String updownAngle;
    public String leftRightAngle;

    /**
     * 分享字段
     */
    public String shareUrl;
    public String shareTitle;
    public String sharePic;
    public String shareContent;

    /**
     * weibo linkcard字段
     */
    public String weiboContent;
    public String weiboPic;

    /**
     * 新增视频信息,是一个LinkedHashMap,对于json的一个JSONObject
     */
    public Object extraData;

    //vr test
    public boolean isVr() {
        return "vr".equalsIgnoreCase(cameraType);
    }

    public VideoPlayModel getVideo() {
        if(StringUtils.isBlank(videono) && videoPlay == null)
            return null;
        VideoPlayModel model = new VideoPlayModel();
        model.videoId = videoid;
        model.videoNo = videono;
        model.videoModel = videoPlay;
        return model;
    }

}
